package org.jsbd.boss.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IUserReqDataLogDao;
import org.jsbd.boss.domian.WbUserReqDataLog;
import org.jsbd.boss.service.IUserReqDataLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userReqDataLogService")
public class UserReqDataLogServiceImpl implements IUserReqDataLogService {

	@Autowired
	private IUserReqDataLogDao userReqDataLogDao;

	@Override
	public Map<String, Object> getListPage(DataGridModel page, WbUserReqDataLog log) {

		log = (log == null ? new WbUserReqDataLog() : log);
		log.setPageInfo(page);
		Map<String, Object> results = new HashMap<String, Object>();
		results.put("total", userReqDataLogDao.getListPageCount(log));

		List<WbUserReqDataLog> list = (List<WbUserReqDataLog>) userReqDataLogDao.getList(log);

		results.put("rows", list);
		return results;
	}

}
